import 'package:json_annotation/json_annotation.dart';

part 'data.g.dart';

@JsonSerializable()
class PeriodData {
  int id;
  String name;

  PeriodData({this.id, this.name});

//反序列化
  factory PeriodData.fromJson(Map<String, dynamic> json) =>
      _$PeriodDataFromJson(json);
//序列化
  Map<String, dynamic> toJson() => _$PeriodDataToJson(this);
}
